<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <?php include_http_metas() ?>
  <?php include_metas() ?>
  <?php include_title() ?>
  <?php include_stylesheets() ?>
  <?php include_javascripts() ?>
  <link rel="shortcut icon" href="/favicon.ico" />
</head>
<body>

  <div id="container">
    <div id="header" class="clearfix">
      <div id="logo">
        <h1><a href="<?php echo url_for('@homepage') ?>">世界旅游小姐-国际选美大赛</a></h1>
      </div>
      <div id="account">
        <a href="/">网站首页</a> |
        <a href="<?php echo url_for('@homepage') ?>">管理首页</a>
        <?php if ($sf_user->isAuthenticated()): ?>
          |
          <a href="<?php 
            echo url_for('@session_destroy?id=' . $sf_user->getAttribute('id')) 
          ?>" class="last">退出</a>
        <?php endif ?>
      </div>
    </div>
    
    <div id="middle" class="clearfix">
      <div id="sidebar">
        <?php if ($sf_user->isAuthenticated()): ?>
        <ul>
          <?php if ($sf_user->hasCredential('super')): ?>
            <li><?php echo link_to('赛区', '@area') ?></li>
            <li style="margin-bottom:20px;"><?php echo link_to('分类', '@category') ?></li>
          <?php endif ?>
          
          <?php if ($sf_user->hasCredential('super') || $sf_user->hasCredential('admin')): ?>
            <li style="margin-bottom:20px;"><?php echo link_to('报名表', '@application') ?></li>
            <li><?php echo link_to('选手', '@contestant') ?></li>
            <li><?php echo link_to('选手照片', '@picture') ?></li>
			<li><?php echo link_to('选手留言', '@message') ?></li>
            <li style="margin-bottom:20px;"><?php echo link_to('选手视频', '@vcr') ?></li>
          <?php endif ?>
          
            <li><?php echo link_to('文章', '@article') ?></li>
            <li><?php echo link_to('评论', '@comment') ?></li>
            <li><?php echo link_to('文章图片', '@article_picture') ?></li>
            <li style="margin-bottom:20px;"><?php echo link_to('文章推荐', '@article_recommendation_log') ?></li>
            
            <li><?php echo link_to('照片', '@photo') ?></li>
            <li style="margin-bottom:20px;"><?php echo link_to('视频', '@video') ?></li>
          
          <?php if ($sf_user->hasCredential('super')): ?>
            <li><?php echo link_to('首页文字', '@homepage_text') ?></li>
			<li><?php echo link_to('首页文字2', '@homepage_text2') ?></li>
            <li style="margin-bottom:20px;"><?php echo link_to('首页图片', '@homepage_image') ?></li>
          <?php endif ?>
          
            <li><?php echo link_to('大赛专区', '@area_image') ?></li>
            <li><?php echo link_to('大赛头条', '@headline') ?></li>
            <li style="margin-bottom:20px;"><?php echo link_to('副标题', '@headline2') ?></li>
          
          <?php if ($sf_user->hasCredential('super')): ?>
            <li><?php echo link_to('管理员', '@administrator') ?></li>
          <?php endif ?>
        </ul>
        <?php endif ?>
      </div>
      <div id="content">
        <?php if ($sf_user->hasFlash('message')): ?>
          <p class="message"><?php echo $sf_user->getFlash('message') ?></p>
        <?php endif ?>
        <?php echo $sf_content ?>
      </div>
    </div>
    
    <div id="footer">
      <p>Copyright &copy; 2010, 世界旅游小姐国际选美大赛组委会 版权所有</p>
      <!--p>技术支持：<a href="#">奇谷科技</a>电话：010-99999999</p-->
    </div>
    
  </div>
  
  <script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script>
  <script type="text/javascript">
  try {
  var pageTracker = _gat._getTracker("UA-16216214-1");
  pageTracker._trackPageview();
  } catch(err) {}
  </script>

</body>
</html>
